pack_file object

This method will add a file to the currently open pack file.

bool add_file(string file_on_disk, string internal_name)

Parameters:
file_on_disk
The filename stored on disk to add to the pack file.
internal_name
An internal storage name that should be used to refer to it inside the pack file.

Return value:
true on success, false on failure.

Remarks:
The pack file must be opened in write mode with the create method for this operation to be successful.

The internal_name parameter is simply used to refer to the file inside the pack. This can contain any characters and can be laid out in any format.

Example:
// Create a pack file and add some test files.

void main()
{
pack_file test;
test.create("pack.dat");
test.add_file("test1.txt","t1");
test.add_file("test2.txt","t2");
test.add_file("test3.txt","t3");
test.close();
}